package com.dstation.domain;

import java.sql.Timestamp;
import java.util.Date;

public class TagInfo {
    private Long tagId;

    private String tagName;

    private Timestamp createDate;

    public Long getTagId() {
        return tagId;
    }

    public void setTagId(Long tagId) {
        this.tagId = tagId;
    }

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Override
    public boolean equals(Object obj) {
       if((this.getTagId().equals(((TagInfo)obj).getTagId())) && (this.getTagName().equals(((TagInfo)obj).getTagName()))
       && (this.getCreateDate().equals( ((TagInfo)obj).getCreateDate()))) {
            return true;
       } else {
           return false;
       }
    }

    public TagInfo() {
    }

    public TagInfo(Long tagId, String tagName) {
        this.tagId = tagId;
        this.tagName = tagName;
        this.createDate= new Timestamp(System.currentTimeMillis());
    }
}